home *** CD-ROM | disk | FTP | other *** search
- $! ****************************************************************************
- $! DOCREVS.COM
- $!
- $! This is an example of DOCZ System automation.
- $!
- $! This command file notifies all programmers of revisions and fixes in
- $! CSUB (a function library) and UTIL (a program library) since yesterday.
- $! The DOCZ System feature to generate revision notices and fix notices is
- $! utilitized. The assumption is made that this command file will be run
- $! daily at the beginning of the day. The notices are deposited in a
- $! common directory where they can be picked-up and perused by programmers.
- $!
- $! DIR_TEMP directory used for temporary files
- $! SYS$USER:[COMMON.DOC] notices depository directory
- $! DIR_COMMON:MAILFILE.COM MAIL utility command file (see UTIL docs)
- $!
- $! Note: subroutines were implemented in VMS 4.5, consequently this
- $! procedure will not run under earlier VMS versions
- $! ****************************************************************************
- $!
- $ SET NOON
- $ TAB = " "
- $! The NOTIFY_LIST variable contains a list of recipients for the notices
- $! It may contain discrete names or names of distribution list(s), as in
- $! NOTIFY_LIST = "@SYS$MANAGER:LIST_OF_DEVELOPERS.DIS". This will passed
- $! to the MAIL utility.
- $ NOTIFY_LIST = "TODD,ROGER" ! two recipients
- $!
- $ WRITE SYS$OUTPUT -
- "*** Generating update notice"
- $ SET DEFAULT DIR_TEMP ! directory used for creating temporary files
- $! note: default date format (MM/DD/YY) is used here
- $ TIMESTR = F$CVTIME("YESTERDAY",,"MONTH")+"/"-
- +F$CVTIME("YESTERDAY",,"DAY")+"/"-
- +F$EXTRACT(2,2,F$CVTIME("YESTERDAY",,"YEAR"))
- $ OPEN/WRITE MSGFILE REVMSG.TXT
- $!
- $ DOC CSUB /R='TIMESTR'
- $ FRED = $STATUS
- $ RENAME/LOG CSUB.DOC CSUB.REV
- $ IF FRED .EQ. 3 THEN CALL NO_REV "CSUB Revisions"
- $ IF FRED .NE. 3 THEN CALL YES_REV -
- "CSUB Revisions" -
- CSUB.REV -
- SYS$USER:[COMMON.DOC] ! deposit directory
- $!
- $ DOC CSUB /F='TIMESTR'
- $ FRED = $STATUS
- $ RENAME/LOG CSUB.DOC CSUB.FIX
- $ IF FRED .EQ. 3 THEN CALL NO_REV "CSUB Fixes"
- $ IF FRED .NE. 3 THEN CALL YES_REV -
- "CSUB Fixes" -
- CSUB.FIX -
- SYS$USER:[COMMON.DOC]
- $!
- $ DOC CSUB /I='TIMESTR'
- $ FRED = $STATUS
- $ RENAME/LOG CSUB.DOC CSUB.NEW
- $ IF FRED .EQ. 3 THEN CALL NO_REV "CSUB Introductions"
- $ IF FRED .NE. 3 THEN CALL YES_REV -
- "CSUB Introductions" -
- CSUB.NEW -
- SYS$USER:[COMMON.DOC]
- $!
- $ DOC UTIL /R='TIMESTR'
- $ FRED = $STATUS
- $ RENAME/LOG UTIL.DOC UTIL.REV
- $ IF FRED .EQ. 3 THEN CALL NO_REV "UTIL Revisions"
- $ IF FRED .NE. 3 THEN CALL YES_REV -
- "UTIL Revisions" -
- UTIL.REV -
- SYS$USER:[COMMON.DOC]
- $!
- $ DOC UTIL /F='TIMESTR'
- $ FRED = $STATUS
- $ RENAME/LOG UTIL.DOC UTIL.FIX
- $ IF FRED .EQ. 3 THEN CALL NO_REV "UTIL Fixes"
- $ IF FRED .NE. 3 THEN CALL YES_REV -
- "UTIL Fixes" -
- UTIL.FIX -
- SYS$USER:[COMMON.DOC]
- $!
- $ DOC UTIL /I='TIMESTR'
- $ FRED = $STATUS
- $ RENAME/LOG UTIL.DOC UTIL.NEW
- $ IF FRED .EQ. 3 THEN CALL NO_REV "UTIL Introductions"
- $ IF FRED .NE. 3 THEN CALL YES_REV -
- "UTIL Introductions" -
- UTIL.NEW -
- SYS$USER:[COMMON.DOC]
- $!
- $ CLOSE MSGFILE
- $ SUBMIT/NOLOG/NONOTIFY/NOPRINT/-
- PARAM=("CSUB and UTIL Daily Updates for ''TIMESTR'",-
- "DIR_TEMP:REVMSG.TXT",-
- 'NOTIFY_LIST',-
- "DELETE") -
- DIR_COMMON:MAILFILE ! see UTIL documentation for MAILFILE
- $ PURGE/NOLOG/KEEP=5 SYS$USER:[COMMON.DOC] ! keep last 5 days of notices
- $ EXIT
- $!
- $! dcl subroutines
- $!
- $ NO_REV: SUBROUTINE ! no notices for this library
- $! p1 = message
- $ WRITE MSGFILE P1,":",TAB,"NONE"
- $ ENDSUBROUTINE
- $!
- $ YES_REV: SUBROUTINE ! generate notice message for this library
- $! p1 = message
- $! p2 = file for notice
- $! p3 = deposit directory
- $ SET NOON
- $ WRITE MSGFILE P1,":",TAB,P3,P2
- $ COPY/LOG 'P2' 'P3'
- $ DELETE/NOCONFIRM 'P2';
- $ ENDSUBROUTINE
- $!
- $! ****************************************************************************
- $! end DOCREVS.COM
- $! ****************************************************************************
-
-